export default {
  name: "deviceListDetail",
  props: {
    detailObj: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  watch: {},
  data() {
    return {
      // 颜色
      className: "",
      // 设备状态
      statusText: "",
    };
  },
  components: {},
  created() {},
  mounted() {
    if (this.detailObj.equipmentStatus == "1") {
      this.className = "border_left_5_solid_17ca5a";
      this.statusText = "在线";
    } else if (this.detailObj.equipmentStatus == "2") {
      this.className = "border_left_5_solid_cccccc";
      this.statusText = "离线";
    } else if (this.detailObj.equipmentStatus == "3") {
      this.className = "border_left_5_solid_fb5f5f";
      this.statusText = "故障";
    }
  },
  computed: {},
  methods: {
    // 获取详情
    detailFn(id) {
      this.$emit("detailEmit", id);
    },
  },
};
